3.302 \(\int \frac {d+e x}{x (a^2-c^2 x^2)} \, dx\)

Optimal. Leaf size=56 \[ -\frac {(a e+c d) \log (a-c x)}{2 a^2 c}-\frac {(c d-a e) \log (a+c x)}{2 a^2 c}+\frac {d \log (x)}{a^2} \]

[Out]

d*ln(x)/a^2-1/2*(a*e+c*d)*ln(-c*x+a)/a^2/c-1/2*(-a*e+c*d)*ln(c*x+a)/a^2/c

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {801} \[ -\frac {(a e+c d) \log (a-c x)}{2 a^2 c}-\frac {(c d-a e) \log (a+c x)}{2 a^2 c}+\frac {d \log (x)}{a^2} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)/(x*(a^2 - c^2*x^2)),x]

[Out]

(d*Log[x])/a^2 - ((c*d + a*e)*Log[a - c*x])/(2*a^2*c) - ((c*d - a*e)*Log[a + c*x])/(2*a^2*c)

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rubi steps

\begin {align*} \int \frac {d+e x}{x \left (a^2-c^2 x^2\right )} \, dx &=\int \left (\frac {d}{a^2 x}-\frac {-c d-a e}{2 a^2 (a-c x)}+\frac {-c d+a e}{2 a^2 (a+c x)}\right ) \, dx\\ &=\frac {d \log (x)}{a^2}-\frac {(c d+a e) \log (a-c x)}{2 a^2 c}-\frac {(c d-a e) \log (a+c x)}{2 a^2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 44, normalized size = 0.79 \[ -\frac {d \log \left (a^2-c^2 x^2\right )}{2 a^2}+\frac {d \log (x)}{a^2}+\frac {e \tanh ^{-1}\left (\frac {c x}{a}\right )}{a c} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)/(x*(a^2 - c^2*x^2)),x]

[Out]

(e*ArcTanh[(c*x)/a])/(a*c) + (d*Log[x])/a^2 - (d*Log[a^2 - c^2*x^2])/(2*a^2)

________________________________________________________________________________________

fricas [A]  time = 0.91, size = 48, normalized size = 0.86 \[ \frac {2 \, c d \log \relax (x) - {\left (c d - a e\right )} \log \left (c x + a\right ) - {\left (c d + a e\right )} \log \left (c x - a\right )}{2 \, a^{2} c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x/(-c^2*x^2+a^2),x, algorithm="fricas")

[Out]

1/2*(2*c*d*log(x) - (c*d - a*e)*log(c*x + a) - (c*d + a*e)*log(c*x - a))/(a^2*c)

________________________________________________________________________________________

giac [A]  time = 0.17, size = 64, normalized size = 1.14 \[ \frac {d \log \left ({\left | x \right |}\right )}{a^{2}} - \frac {{\left (c^{2} d - a c e\right )} \log \left ({\left | c x + a \right |}\right )}{2 \, a^{2} c^{2}} - \frac {{\left (c^{2} d + a c e\right )} \log \left ({\left | c x - a \right |}\right )}{2 \, a^{2} c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x/(-c^2*x^2+a^2),x, algorithm="giac")

[Out]

d*log(abs(x))/a^2 - 1/2*(c^2*d - a*c*e)*log(abs(c*x + a))/(a^2*c^2) - 1/2*(c^2*d + a*c*e)*log(abs(c*x - a))/(a
^2*c^2)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 67, normalized size = 1.20 \[ -\frac {e \ln \left (c x -a \right )}{2 a c}+\frac {e \ln \left (c x +a \right )}{2 a c}+\frac {d \ln \relax (x )}{a^{2}}-\frac {d \ln \left (c x -a \right )}{2 a^{2}}-\frac {d \ln \left (c x +a \right )}{2 a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)/x/(-c^2*x^2+a^2),x)

[Out]

1/2/a/c*ln(c*x+a)*e-1/2/a^2*ln(c*x+a)*d-1/2/a/c*ln(c*x-a)*e-1/2/a^2*ln(c*x-a)*d+1/a^2*d*ln(x)

________________________________________________________________________________________

maxima [A]  time = 0.55, size = 53, normalized size = 0.95 \[ \frac {d \log \relax (x)}{a^{2}} - \frac {{\left (c d - a e\right )} \log \left (c x + a\right )}{2 \, a^{2} c} - \frac {{\left (c d + a e\right )} \log \left (c x - a\right )}{2 \, a^{2} c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x/(-c^2*x^2+a^2),x, algorithm="maxima")

[Out]

d*log(x)/a^2 - 1/2*(c*d - a*e)*log(c*x + a)/(a^2*c) - 1/2*(c*d + a*e)*log(c*x - a)/(a^2*c)

________________________________________________________________________________________

mupad [B]  time = 1.15, size = 52, normalized size = 0.93 \[ \frac {d\,\ln \relax (x)}{a^2}+\frac {\ln \left (a+c\,x\right )\,\left (a\,e-c\,d\right )}{2\,a^2\,c}-\frac {\ln \left (a-c\,x\right )\,\left (a\,e+c\,d\right )}{2\,a^2\,c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*x)/(x*(a^2 - c^2*x^2)),x)

[Out]

(d*log(x))/a^2 + (log(a + c*x)*(a*e - c*d))/(2*a^2*c) - (log(a - c*x)*(a*e + c*d))/(2*a^2*c)

________________________________________________________________________________________

sympy [B]  time = 1.59, size = 194, normalized size = 3.46 \[ \frac {d \log {\relax (x )}}{a^{2}} + \frac {\left (a e - c d\right ) \log {\left (x + \frac {- 2 a^{2} d e^{2} + \frac {a^{2} e^{2} \left (a e - c d\right )}{c} - 6 c^{2} d^{3} - 3 c d^{2} \left (a e - c d\right ) + 3 d \left (a e - c d\right )^{2}}{a^{2} e^{3} - 9 c^{2} d^{2} e} \right )}}{2 a^{2} c} - \frac {\left (a e + c d\right ) \log {\left (x + \frac {- 2 a^{2} d e^{2} - \frac {a^{2} e^{2} \left (a e + c d\right )}{c} - 6 c^{2} d^{3} + 3 c d^{2} \left (a e + c d\right ) + 3 d \left (a e + c d\right )^{2}}{a^{2} e^{3} - 9 c^{2} d^{2} e} \right )}}{2 a^{2} c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x/(-c**2*x**2+a**2),x)

[Out]

d*log(x)/a**2 + (a*e - c*d)*log(x + (-2*a**2*d*e**2 + a**2*e**2*(a*e - c*d)/c - 6*c**2*d**3 - 3*c*d**2*(a*e -
c*d) + 3*d*(a*e - c*d)**2)/(a**2*e**3 - 9*c**2*d**2*e))/(2*a**2*c) - (a*e + c*d)*log(x + (-2*a**2*d*e**2 - a**
2*e**2*(a*e + c*d)/c - 6*c**2*d**3 + 3*c*d**2*(a*e + c*d) + 3*d*(a*e + c*d)**2)/(a**2*e**3 - 9*c**2*d**2*e))/(
2*a**2*c)

________________________________________________________________________________________